home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 05 - 1989 / 05.06 Jun 89 / LOC Source / Test Source / Test.r < prev    next >
Encoding:
Text File  |  1988-08-19  |  5.7 KB  |  298 lines  |  [TEXT/MPS ]

  1. /*****************************************************
  2. Test.r
  3.     Resources for List-Of-Controls example.
  4. *****************************************************/
  5.  
  6.  
  7. /***********************Types***********************/
  8. #include "Types.r"
  9. #include "PopMenuCDEF.r"
  10.  
  11. type 'INT#' {
  12.     integer = $$Countof(IntegerArray);
  13.     
  14.     array IntegerArray {
  15.         integer;
  16.     };
  17. };
  18.  
  19. /**********************Defines**********************/
  20. #define    RES_ID        128
  21.  
  22.  
  23.  
  24. /*********************Resources********************/
  25. data 'LDEF' (RES_ID, "ControlLDEF") {
  26.     $$resource("ControlLDEF.LDEF", 'LDEF', 1)
  27. };
  28.  
  29. data 'CDEF' (pmCDEFResID, "popMenus") {
  30.     $$resource("PopMenuCDEF.CDEF", 'CDEF', 1)
  31. };
  32.  
  33. resource 'DLOG' (RES_ID, "RES_ID") {
  34.     {54, 170, 254, 470},
  35.     dBoxProc,
  36.     invisible,
  37.     noGoAway,
  38.     0x0,
  39.     RES_ID,
  40.     ""
  41. };
  42.  
  43. resource 'DITL' (RES_ID, "RES_ID") {
  44.     { /* array DITLarray: 3 elements */
  45.         /* [1] */
  46.         {170, 125, 190, 185},
  47.         Button {
  48.             enabled,
  49.             "OK"
  50.         },
  51.         /* [2] */
  52.         {10, 10, 72, 290},
  53.         UserItem {
  54.             enabled
  55.         },
  56.         /* [3] */
  57.         {82, 10, 160, 290},
  58.         StaticText {
  59.             disabled,
  60.             "List of Controls LDEF example.  "
  61.             "James Plamondon, Abacus Concepts, "
  62.             "1984 Bonita Avenue, Berkeley, CA  "
  63.             "94704."
  64.         }
  65.     }
  66. };
  67.  
  68. resource 'INT#' (RES_ID, "Control ID's") {
  69.     { /* array INTArray: 5 elements */
  70.         /* [1] */
  71.         128,
  72.         /* [2] */
  73.         129,
  74.         /* [3] */
  75.         130,
  76.         /* [4] */
  77.         131,
  78.         /* [5] */
  79.         132
  80.     }
  81. };
  82.     
  83.  
  84. resource 'CNTL' (128) {
  85.     {0, 0, 0, 0},            /* rect:  contrlRect    */
  86.     128,                /* value: menu rsrc ID     */
  87.     invisible,            /* vis:  standard        */
  88.     128,                /* max:  default menuID    */
  89.     2,                    /* min:  default item #    */
  90.     popMenuProc         /* ProcID:  3             */
  91.         + mCheck,        /* var: Check selection    */
  92.     0,                    /* rfCon: for user's use*/
  93.     "Thanks to: "        /* title: standard        */
  94. };
  95.  
  96. resource 'MENU' (128) {
  97.     128,
  98.     textMenuProc,
  99.     allEnabled,
  100.     enabled,
  101.     "Thanks To: ",
  102.     {    /* 11 items */
  103.         "Mark Williams",
  104.             noIcon, noKey, noMark, plain;
  105.         "Mark Bennet",
  106.             noIcon, noKey, appleChar, plain;
  107.         "Joseph Daniel",
  108.             noIcon, noKey, noMark, plain;
  109.         "Dr. Don Morrison",
  110.             noIcon, noKey, noMark, plain;
  111.         "Andrew Stone",
  112.             noIcon, noKey, noMark, plain;
  113.         "Eleanor Plamondon",
  114.             noIcon, noKey, noMark, plain;
  115.         "Bruce Wampler",
  116.             noIcon, noKey, noMark, plain;
  117.         "Patricia Guffey",
  118.             noIcon, noKey, noMark, plain;
  119.         "Greta Shaw",
  120.             noIcon, noKey, noMark, plain;
  121.         "Monty \"Montana-Unit\" Cole",
  122.             noIcon, noKey, noMark, plain;
  123.         "Dr. Bernard Moret",
  124.             noIcon, noKey, noMark, plain
  125.     }
  126. };
  127.  
  128. resource 'CNTL' (129) {
  129.     {0, 0, 0, 0},        /* rect:  contrlRect    */
  130.     129,                /* value: rsrc ID        */
  131.     invisible,            /* vis:  standard        */
  132.     129,                /* max: default  menuID    */
  133.     2,                    /* min:  default item #    */
  134.     popMenuProc         /* ProcID: 3             */
  135.         + mRes            /* var: add res names    */
  136.         + mCheck,        /* var: Check selection    */
  137.     'FONT',                /* rfCon: OSType        */
  138.     "Fonts: "            /* title: standard        */
  139. };
  140.  
  141. resource 'MENU' (129) {
  142.     129,
  143.     textMenuProc,
  144.     allEnabled,
  145.     enabled,
  146.     "Fonts:        ",
  147.     {    /* 0 items */
  148.     }
  149. };
  150.  
  151. resource 'CNTL' (130) {
  152.     {0, 0, 0, 0},        /* rect:  contrlRect    */
  153.     130,                /* value: rsrc ID         */
  154.     invisible,            /* vis:  standard        */
  155.     133,                /* max:  default menuID    */
  156.     1,                    /* min: default  item #    */
  157.     popMenuProc            /* ProcID: 3            */
  158.         + mCheck        /* var: Check selection    */
  159.         + mSub,            /* var: sub-menus        */
  160.     0,                    /* rfCon: for user's use*/
  161.     "SubMenu: "            /* title: standard        */
  162. };
  163.  
  164. resource 'MENU' (130) {
  165.     130,
  166.     textMenuProc,
  167.     allEnabled,
  168.     enabled,
  169.     "Root:          ",
  170.     {    /* 2 items */
  171.         "Root Item1",
  172.             noIcon, parent, "\0D131", plain;
  173.         "Root Item2",
  174.             noIcon, parent, "\0D132", plain
  175.     }
  176. };
  177.  
  178. resource 'MENU' (131) {
  179.     131,
  180.     textMenuProc,
  181.     allEnabled,
  182.     enabled,
  183.     "",
  184.     {    /* 2 items */
  185.         "Sub-1 Item1",
  186.             noIcon, noKey, noMark, plain;
  187.         "Sub-1 Item2",
  188.             noIcon, noKey, noMark, plain;
  189.         "Sub-1 Item3",
  190.             noIcon, parent, "\0D133", plain
  191.     }
  192. };
  193.  
  194. resource 'MENU' (132) {
  195.     132,
  196.     textMenuProc,
  197.     allEnabled,
  198.     enabled,
  199.     "",
  200.     {    /* 2 items */
  201.         "Sub-2 Item1",
  202.             noIcon, noKey, noMark, plain;
  203.         "Sub-2 Item2",
  204.             noIcon, noKey, noMark, plain;
  205.         "Sub-2 Item3 (a very, very, very wide item)",
  206.             noIcon, noKey, noMark, plain
  207.     }
  208. };
  209.  
  210. resource 'MENU' (133) {
  211.     133,
  212.     textMenuProc,
  213.     allEnabled,
  214.     enabled,
  215.     "",
  216.     {    /* 2 items */
  217.         "Sub-3 Item1",
  218.             noIcon, noKey, noMark, plain;
  219.         "Sub-3 Item2",
  220.             noIcon, noKey, noMark, plain;
  221.         "Sub-3 Item3",
  222.             noIcon, noKey, noMark, plain
  223.     }
  224. };
  225.     
  226.  
  227. resource 'CNTL' (131) {
  228.     {0, 0, 0, 0},        /* rect:  contrlRect    */
  229.     134,                /* value: menu rsrc ID     */
  230.     invisible,            /* vis:  standard        */
  231.     134,                /* max:  default menuID    */
  232.     1,                    /* min:  default item #    */
  233.     popMenuProc         /* ProcID:  3             */
  234.         + mCheck,        /* var: Check selection    */
  235.     0,                    /* rfCon: for user's use*/
  236.     "At Abacus: "        /* title: standard        */
  237. };
  238.  
  239. resource 'MENU' (134) {
  240.     134,
  241.     textMenuProc,
  242.     allEnabled,
  243.     enabled,
  244.     "At Abacus: ",
  245.     {    /* 5 items */
  246.         "Dan Feldman",
  247.             noIcon, noKey, noMark, plain;
  248.         "Jim Gagnon",
  249.             noIcon, noKey, noMark, plain;
  250.         "Will Scoggin",
  251.             noIcon, noKey, noMark, plain;
  252.         "James Plamondon",
  253.             noIcon, noKey, noMark, plain;
  254.         "Jay Roth",
  255.             noIcon, noKey, noMark, plain;
  256.         "Tiffiny Fyans",
  257.             noIcon, noKey, noMark, plain;
  258.         "Jeanette Stafford",
  259.             noIcon, noKey, noMark, plain
  260.     }
  261. };
  262.     
  263.  
  264. resource 'CNTL' (132) {
  265.     {0, 0, 0, 0},        /* rect:  contrlRect    */
  266.     135,                /* value: menu rsrc ID     */
  267.     invisible,            /* vis:  standard        */
  268.     135,                /* max:  default menuID    */
  269.     1,                    /* min:  default item #    */
  270.     popMenuProc         /* ProcID:  3             */
  271.         + mCheck,        /* var: Check selection    */
  272.     0,                    /* rfCon: for user's use*/
  273.     "Programs: "        /* title: standard        */
  274. };
  275.  
  276. resource 'MENU' (135) {
  277.     135,
  278.     textMenuProc,
  279.     allEnabled,
  280.     enabled,
  281.     "Programs: ",
  282.     {    /* 5 items */
  283.         "StatView",
  284.             noIcon, noKey, noMark, plain;
  285.         "StatView 512+",
  286.             noIcon, noKey, noMark, plain;
  287.         "StatView SE+Graphics",
  288.             noIcon, noKey, noMark, plain;
  289.         "StatView II",
  290.             noIcon, noKey, noMark, plain;
  291.         "SuperANOVA",
  292.             noIcon, noKey, noMark, plain
  293.     }
  294. };
  295.  
  296.  
  297.  
  298.